package com.shangdiao.sd_server.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shangdiao.sd_server.dao.mybatis.SdDicCertificateMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicCompanyFieldMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicDistrictMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicEducationMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicInternshipFieldMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicLabelMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicParttimeFieldMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicSettlementMapper;
import com.shangdiao.sd_server.dao.mybatis.SdDicUniversityMapper;
import com.shangdiao.sd_server.generator.pojo.SdDicCertificate;
import com.shangdiao.sd_server.generator.pojo.SdDicCertificateExample;
import com.shangdiao.sd_server.generator.pojo.SdDicCompanyField;
import com.shangdiao.sd_server.generator.pojo.SdDicCompanyFieldExample;
import com.shangdiao.sd_server.generator.pojo.SdDicDistrict;
import com.shangdiao.sd_server.generator.pojo.SdDicDistrictExample;
import com.shangdiao.sd_server.generator.pojo.SdDicEducation;
import com.shangdiao.sd_server.generator.pojo.SdDicEducationExample;
import com.shangdiao.sd_server.generator.pojo.SdDicInternshipField;
import com.shangdiao.sd_server.generator.pojo.SdDicInternshipFieldExample;
import com.shangdiao.sd_server.generator.pojo.SdDicLabel;
import com.shangdiao.sd_server.generator.pojo.SdDicLabelExample;
import com.shangdiao.sd_server.generator.pojo.SdDicParttimeField;
import com.shangdiao.sd_server.generator.pojo.SdDicParttimeFieldExample;
import com.shangdiao.sd_server.generator.pojo.SdDicSettlement;
import com.shangdiao.sd_server.generator.pojo.SdDicSettlementExample;
import com.shangdiao.sd_server.generator.pojo.SdDicUniversity;
import com.shangdiao.sd_server.generator.pojo.SdDicUniversityExample;
import com.shangdiao.sd_server.service.DicService;

@Service(value = "dicService")
public class DicServiceImpl implements DicService {
    
	@Autowired
    SdDicLabelMapper dicLabelMapper;
	@Autowired
	SdDicCertificateMapper dicCertificateMapper;
	@Autowired
	SdDicCompanyFieldMapper dicCompanyFieldMapper;
	@Autowired
	SdDicDistrictMapper dicDistrictMapper;
	@Autowired
	SdDicEducationMapper dicEducationMapper;
	@Autowired
	SdDicInternshipFieldMapper dicInternshipFieldMapper;
	@Autowired
	SdDicParttimeFieldMapper dicParttimeFieldMapper;
	@Autowired
	SdDicUniversityMapper dicUniversityMapper;
	@Autowired
	SdDicSettlementMapper dicSettlementMapper;
    
	@Override
	public int newDicLabel(SdDicLabel record) {
		return dicLabelMapper.insert(record);
	}
	@Override
	public int updateDicLabel(SdDicLabel record) {
		return dicLabelMapper.updateByPrimaryKeySelective(record);
	}
	@Override
	public int updateDicLabel(SdDicLabel record, SdDicLabelExample example) {
		return dicLabelMapper.updateByExampleSelective(record, example);
	}
	@Override
	public List<SdDicCertificate> selectByExample(SdDicCertificateExample example){
		return dicCertificateMapper.selectByExample(example);
	}
	@Override
	public List<SdDicLabel> selectByExample(SdDicLabelExample example){
		return dicLabelMapper.selectByExample(example);
	}
	@Override
	public List<SdDicCompanyField> selectByExample(SdDicCompanyFieldExample example){
		return dicCompanyFieldMapper.selectByExample(example);
	}
	@Override
	public List<SdDicDistrict> selectByExample(SdDicDistrictExample example){
		return dicDistrictMapper.selectByExample(example);
	}
	@Override
	public List<SdDicEducation> selectByExample(SdDicEducationExample example){
		return dicEducationMapper.selectByExample(example);
	}
	@Override
	public List<SdDicInternshipField> selectByExample(SdDicInternshipFieldExample example){
		return dicInternshipFieldMapper.selectByExample(example);
	}
	@Override
	public List<SdDicUniversity> selectByExample(SdDicUniversityExample example){
		return dicUniversityMapper.selectByExample(example);
	}
	@Override
	public List<SdDicParttimeField> selectByExample(SdDicParttimeFieldExample example) {
		return dicParttimeFieldMapper.selectByExample(example);
	}
	@Override
	public List<String> selectInternshipCategory() {
		return dicInternshipFieldMapper.selectDistinctCategory();
	}
	@Override
	public SdDicDistrict selectDistrictById(Integer districtId) {
		return dicDistrictMapper.selectByPrimaryKey(districtId);
	}
	@Override
	public List<SdDicSettlement> selectByExample(SdDicSettlementExample example) {
		return dicSettlementMapper.selectByExample(example);
	}
	@Override
	public List<String> selectCertificateCategory() {
		return dicCertificateMapper.selectDistinctCategory();
	}
	@Override
	public List<String> selectLabelCategory() {
		return dicLabelMapper.selectDistinctCategory();
	}
	@Override
	public int insertDicLabel(SdDicLabel record) {
		return dicLabelMapper.insertSelective(record);
	}
	@Override
	public SdDicSettlement selectDicSettlementById(Integer dicSettlementId) {
		return dicSettlementMapper.selectByPrimaryKey(dicSettlementId);
	}
	@Override
	public SdDicInternshipField selectInternshipField(Integer dicFieldId) {
		return dicInternshipFieldMapper.selectByPrimaryKey(dicFieldId); 
	}
	@Override
	public SdDicParttimeField selectParttimeField(Integer dicFieldId) {
		return dicParttimeFieldMapper.selectByPrimaryKey(dicFieldId);
	}
	@Override
	public SdDicEducation selectDicEducation(Integer dicEducationId) {
		return dicEducationMapper.selectByPrimaryKey(dicEducationId);
	}
	@Override
	public SdDicUniversity selectUniversity(Integer universityId) {
		return dicUniversityMapper.selectByPrimaryKey(universityId);
	}
    

}
